<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>03-Object中的方法</title>
</head>
<body>
  <script>
    const obj = {
      name:'jack',
      age:20
    }
    const info = {
      score:100,
      age:22,
      address:'宝安区'
    }
    const test = {
      gender:'男',
      school:'深圳校区',
      address:'龙岗区',
      name:''
    }

    // console.log(obj)
    // 将后面对象中的属性合并到第1对象当中 如果属性有重名则会覆盖 
    Object.assign(obj,info,test)
    console.log(obj)

    // Object.keys()  提取对象中的属性名
    console.log(Object.keys(test))
  </script>
</body>
</html>